$OpenBSD: patch-src_libming_h,v 1.1 2013/09/25 07:58:44 sthen Exp $

support giflib 5.0+, from http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/multimedia/ming/patches/

--- src/libming.h.orig	Sat Jun  8 08:08:51 2013
+++ src/libming.h	Fri Sep 20 02:51:55 2013
@@ -31,6 +31,7 @@
 
 #include <stdio.h>
 #include <math.h>
+#include <gif_lib.h>
 
 
 #include "ming.h"
@@ -78,9 +79,14 @@ typedef unsigned char BOOL;
 
 #if GIFLIB_GIFERRORSTRING
 static void
-PrintGifError(void)
+PrintGifError(int ErrorCode)
 {
-	fprintf(stderr, "\nGIF-LIB error: %s.\n", GifErrorString());
+	char *Err = GifErrorString(ErrorCode);
+
+	if (Err != NULL)
+		fprintf(stderr, "\nGIF-LIB error: %s.\n", Err);
+	else
+		fprintf(stderr, "\nGIF-LIB undefined error %d.\n", ErrorCode);
 }
 #endif
 
